package com.wangyu.springsecuritydemo.service.impl;

import com.wangyu.springsecuritydemo.entity.primary.PermissionEntity;
import com.wangyu.springsecuritydemo.repository.primary.PermissionRepository;
import com.wangyu.springsecuritydemo.service.PermissionService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 权限服务层实现
 *
 * @author wangyu
 * @Date 2019/2/19 17:45
 * @Version 1.0
 **/
@Service("permissionService")
public class PermissionServiceImpl implements PermissionService {

  @Autowired
  private PermissionRepository permissionRepository;

  @Override
  public List<PermissionEntity> findByResource(String matchUrl) {
    return permissionRepository.findByResource(matchUrl);
  }
}
